//
//  DebugBaseViewController.swift
//  YKSwiftDebugManager
//
//  Created by linghit on 2021/12/2.
//

import UIKit

internal class DebugBaseViewController: UIViewController {
    
    public let startBar_Height = UIApplication.shared.statusBarFrame.size.height
    
    public let screenW = UIScreen.main.bounds.size.width
    public let screenH = UIScreen.main.bounds.size.height
    
    public func bottom_safe()->CGFloat
    {
        if #available(iOS 11.0, *) {
            return self.view.safeAreaInsets.bottom
        } else {
            // Fallback on earlier versions
            return 0
        }
    }
    
    public func navBar_Height()->CGFloat
    {
        return self.navigationController!.navigationBar.frame.size.height
    }
    public func top_Height()->CGFloat
    {
        return navBar_Height() + startBar_Height
    }
    
    
    override func viewDidLoad() {
        super.viewDidLoad()

        // Do any additional setup after loading the view.
        if #available(iOS 13.0, *) {
            view.backgroundColor = .systemBackground
        } else {
            view.backgroundColor = .white
        }
    }
    

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destination.
        // Pass the selected object to the new view controller.
    }
    */

}
